<%@page import="com.metacube.questionbank.model.User"%>
<%!User user;%>
<%
	if (request.getAttribute("tempuser") != null) {
		user = (User) request.getAttribute("tempuser");
	} 
	else
	{
		response.sendRedirect("register.htm");
	}
%>
<%
	System.out.print(request.getAttribute("user") + " and"
			+ session.getAttribute("user"));
%>
<div class="container profile">
	<%
		if (user == null) {
			out.print("<h4>Welcome: <span>" + user.getName()
					+ "</span></h4>");
		}
	%>
	<hr>
	<div class="userDetails clearfix">
		<div class="col-md-3 profile_pic">
			<img src="getImageById.htm?id=<%=user.getUser_id()%>"
				alt="Profile Picture">
		</div>
		<div class="col-md-9 profile_info">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">User personal information...</h3>
				</div>
				<div class="panel-body">
					<form method="#">
						<div class="form-group">
							<label for="name">Name</label> <input type="text"
								class="form-control" readonly placeholder="name"
								value="<%=user.getName()%>">
						</div>
						<div class="form-group">
							<label for="name">E-Mail</label> <input type="text"
								class="form-control" readonly value="<%=user.getEmail()%>">
						</div>
						<div class="form-group">
							<label for="dob">Date of birth</label>
							<div class="input-group date" id="date_picker">
								<input type="date" class="form-control" readonly
									value=<%=user.getDob()%>> <span
									class="input-group-addon"><span
									class="glyphicon glyphicon-calendar"></span>
							</div>
						</div>
						<div class="form-group">
							<label for="gender">Gender</label> <select name="gender"
								id="gender" class="form-control" readonly>
								<option value="<%=user.getGender()%>" selected="selected"><%=user.getGender()%></option>
							</select>
						</div>
						<div class="form-group">
							<label for="about_me">About me</label>
							<div
								style="border: 1px solid #eaeaea; padding: 10px; border-radius: 5px; background: #eee;"><%=user.getAbout_me()%></div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>